package 
{
import core.Context;
import core.Light;
import core.LightOffCommand;
import core.LightOnCommand;
import core.Radio;
import core.RadioOffCommand;
import core.RadioOnCommand;
import flash.display.Sprite;

public class Main extends Sprite
{
	public function Main()
	{
		var context:Context = new Context();
		
		var light:Light = new Light();
		var radio:Radio = new Radio();
		
		context.setCommand(1, new LightOnCommand(light), new LightOffCommand(light));
		context.setCommand(2, new RadioOnCommand(radio), new RadioOffCommand(radio));
		
		context.onButton_Status_OFF_Press(1);
		context.onButton_Status_ON_Press(1);
		
		context.onButton_Status_ON_Press(2);
		context.onButton_Status_OFF_Press(2);
		
		context.undo();
	}
}
}
